package cn.edu.thu.laud.thrift.service;

import java.nio.ByteBuffer;

import org.apache.cassandra.cql.Attributes;


public  class ServiceFileInfo{
	String location=null;
	private char direction='r';
	private boolean overwrite=false;
	FileStoreType type=FileStoreType.HDFS;
	/**
	 * cassandra column info
	 */
	public String keyName;
	public String columnFamily;
	/**
	 * a columName whose type is term(use by insert).
	 */	
	//public Term columnName;
	/**
	 * a columName whose type is bytebuffer(use by select).
	 */
	public ByteBuffer columnNameBuffer;
	//	@Deprecated
	//	public Term columnValue;

	/**
	 * a columnValu whose type is bytebuffer(use by select).
	 */
	public ByteBuffer columnValueBuffer;
	/**
	 * a rowkey whose type is term(use by insert).
	 */
	//	@Deprecated
	//	public Term key;
	/**
	 * a rowkey whose type is bytebuffer(use by select).
	 */
	public ByteBuffer keyBuffer;

	public Attributes attrs;
	public String keyspace;


	public static enum FileStoreType{
		HDFS,C_HDFS,C_KV
	}

	public String getLocation() {
		return location;
	}

	public void setLocation(String location) {
		this.location = location;
	}
	/**
	 * fs type
	 * 
	 * @return
	 */
	public FileStoreType getType() {
		return type;
	}

	public void setType(FileStoreType type) {
		this.type = type;
	}

	public boolean isOverwrite() {
		return overwrite;
	}

	public void setOverwrite(boolean overwrite) {
		this.overwrite = overwrite;
	}

	public void setDirection(char direction) {
		this.direction = direction;
	}

	public char getDirection() {
		return direction;
	}

}